<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>新的页面</h1>
<table id="tbl"></table>
<script>
//    console.log(sessionStorage.getItem('age'));
    
    //要数据
//    Cannot read property 'map' of null
    var psersons = sessionStorage.getItem('persons');
    var tbl = document.getElementById('tbl');
    //将psersons转成对象
    psersons=  JSON.parse(psersons);
    if(!Array.isArray(psersons))
        console.error("不是数组")

   var str = psersons.map(function(item){
        return `
            <tr>
                <td>${item.name}</td>
                <td>${item.age}</td>
                <td>${item.sex}</td>
            </tr>
        `;
    }).join("");

    tbl.innerHTML = str;
</script>
</body>
</html>